{% extends 'home_page/base_index.html' %}
{% load static %}


{% block show_body %}
    {% for interview in interview_schedules %}
    <section class="section">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-header">
                        <h4 class="card-title">{{ interview.job_posting.title }}</h4>
                    </div>
                    <div class="card-body">
                        <p>{{ interview.job_posting.salary_range }} &nbsp&nbsp&nbsp&nbsp {{ interview.job_posting.location }} </p>
                        <div class="divider"><div class="divider-text">招聘岗位介绍</div></div>
                        <p>{{ interview.job_posting.requirements }}</p>
                        <p>{{ interview.job_posting.description }}</p>
                        <p>截止时间：{{ interview.job_posting.deadline }}</p>
                        <div class="divider"><div class="divider-text">面试预约状态</div></div>
                        <p>面试状态：{{ interview.status }}</p>
                        {% if interview.status == 'confirmed' %}
                        <p>面试模式：{{ interview.interview_mode }}</p>
                        <p>面试地点：{{ interview.location }}</p>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </section>
    {% endfor %}
{% endblock %}


{% block show_user %}
    {% if user_label == 1 %}
    {# 当学生用户登录的时候显示学生的姓名和学号 #}
    <div class="card">
        <div class="card-body py-4 px-5">
            <div class="d-flex align-items-center">
                {# 性别不同默认头像不一样 #}
                <div class="avatar avatar-xl">
                    {% if gender == 'female' %}
                        <img src="{% static 'picture/5.jpg' %}" alt="Face female">
                    {% else %}
                        <img src="{% static 'picture/2.jpg' %}" alt="Face male">
                    {% endif %}
                </div>
                {# 加载学生的姓名和学号 #}
                <div class="ms-3 name"><h5 class="font-bold">姓名：{{ student.stu_name }}</h5>
                    <h6 class="text-muted mb-0">
                        学号：{{ request.session.user_id }}
                    </h6>
                </div>
            </div>
        </div>
    </div>
    {% elif user_label == 2 %}
    {# 当企业登录的时候显示组织的名称和账号 #}
    <div class="card">
        <div class="card-body py-4 px-5">
            <div class="d-flex align-items-center">
                <div class="avatar avatar-xl">
                    <img src="{% static 'picture/5.jpg' %}" alt="Face female">
                </div>
                {# 加载企业的姓名和学号 #}
                <div class="ms-3 name"><h5 class="font-bold">名称：{{ organization.name }}</h5>
                    <h6 class="text-muted mb-0">
                        账号：{{ request.session.user_id }}
                    </h6>
                </div>
            </div>
        </div>
    </div>
    {% endif %}




{% endblock %}